package com.zz.parkingsystem.mapper;

import com.zz.parkingsystem.dto.CarDTO;
import com.zz.parkingsystem.dto.CarMessageDTO;
import com.zz.parkingsystem.dto.CarOrderMessageDTO;
import com.zz.parkingsystem.entity.Car;
import com.zz.parkingsystem.vo.CarUserVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import com.zz.parkingsystem.vo.CarMessageVO;
import com.zz.parkingsystem.vo.CarOrderMessageVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
* @author zz
* @description 针对表【t_car(车辆表)】的数据库操作Mapper
* @createDate 2022-08-29 19:49:25
* @Entity com.zz.parkingsystem.entity.Car
*/
@Mapper
@Repository
public interface CarMapper {
    Long getCountCar(CarDTO carDto);
    List<CarUserVO> getCarMes(Long id);


    /**
     * 查询测量管理中的 car_id ,车牌号码，车牌类型，所属用户，创建时间,正常订单数量，异常订单数，消费金额，代缴费金额
     * @return
     */
    List<CarMessageVO> queryAllCarMessage(CarMessageDTO carDTO);

    /**
     * 查询车辆管理管理中,每个订单的的 订单编号，支付时间，车牌号码，订单金额，支付状态，支付方式
     * @return
     */
    List<CarOrderMessageVO> queryAllCarOrderMessage(CarOrderMessageDTO carOrderMessageDTO);
    int deleteByPrimaryKey(Long id);

    int insert(Car record);

    int insertSelective(Car record);

    Car selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Car record);

    int updateByPrimaryKey(Car record);

    Car selCarByCl_id(String cl_id);

    List<Car> selAll();

    List<Car> selCarByUserId(Integer userId);

    Car selCarBycarLicensePlate(String carLicensePlate);
}
